/*
 * Created by JFormDesigner on Wed May 19 10:23:04 CST 2021
 */

package renthouse.view.mainManger;

import renthouse.view.information.uesr.UserFindHouse;
import renthouse.view.information.uesr.UserFindLandlord;
import renthouse.view.information.uesr.UserFindOrder;

import java.awt.*;
import javax.swing.*;

/**
 * @author Brainrain
 * 房客主界面
 */
public class UserFrame extends JFrame {
    public static UserFrame userFrame=null;
    public UserFrame() {
        initComponents();
    }

    private void menuItem1ActionPerformed() {
        // TODO add your code here
        UserFindHouse userFindHouse=new UserFindHouse();
        userFindHouse.setVisible(true);

    }

    private void menuItem2ActionPerformed() {
        // TODO add your code here
        UserFindLandlord userFindLandlord=new UserFindLandlord();
        userFindLandlord.setVisible(true);
    }

    private void menuItem3ActionPerformed() {
        // TODO add your code here
        UserFindOrder userFindOrder=new UserFindOrder();
        userFindOrder.setVisible(true);
    }

    private void menuItem4ActionPerformed() {
        // TODO add your code here
        UserFindOrder userFindOrder=new UserFindOrder();
        userFindOrder.setVisible(true);
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        menuBar1 = new JMenuBar();
        menu1 = new JMenu();
        menuItem1 = new JMenuItem();
        menu2 = new JMenu();
        menuItem2 = new JMenuItem();
        menu4 = new JMenu();
        menuItem3 = new JMenuItem();
        menuItem4 = new JMenuItem();
        panel1 = new JPanel();
        label1 = new JLabel();

        //======== this ========
        setTitle("\u623f\u5ba2\u754c\u9762");
        setAlwaysOnTop(true);
        setFont(new Font("Dialog", Font.PLAIN, 11));
        Container contentPane = getContentPane();
        contentPane.setLayout(null);

        //======== menuBar1 ========
        {

            //======== menu1 ========
            {
                menu1.setText("\u79df\u623f\u8bf7\u6c42");

                //---- menuItem1 ----
                menuItem1.setText("\u67e5\u8be2\u623f\u5c4b");
                menuItem1.addActionListener(e -> menuItem1ActionPerformed());
                menu1.add(menuItem1);
            }
            menuBar1.add(menu1);

            //======== menu2 ========
            {
                menu2.setText("\u623f\u4e1c\u7ba1\u7406");

                //---- menuItem2 ----
                menuItem2.setText("\u67e5\u770b\u623f\u4e1c");
                menuItem2.addActionListener(e -> menuItem2ActionPerformed());
                menu2.add(menuItem2);
            }
            menuBar1.add(menu2);

            //======== menu4 ========
            {
                menu4.setText("\u8ba2\u5355\u7ba1\u7406");

                //---- menuItem3 ----
                menuItem3.setText("\u67e5\u770b\u8ba2\u5355");
                menuItem3.addActionListener(e -> menuItem3ActionPerformed());
                menu4.add(menuItem3);

                //---- menuItem4 ----
                menuItem4.setText("\u5220\u9664\u8ba2\u5355");
                menuItem4.addActionListener(e -> menuItem4ActionPerformed());
                menu4.add(menuItem4);
            }
            menuBar1.add(menu4);
        }
        setJMenuBar(menuBar1);

        //======== panel1 ========
        {
            panel1.setLayout(null);

            //---- label1 ----
            label1.setText("\u623f\u5ba2\u7ba1\u7406\u7cfb\u7edf");
            label1.setFont(label1.getFont().deriveFont(label1.getFont().getSize() + 15f));
            panel1.add(label1);
            label1.setBounds(35, 50, 200, 45);

            { // compute preferred size
                Dimension preferredSize = new Dimension();
                for(int i = 0; i < panel1.getComponentCount(); i++) {
                    Rectangle bounds = panel1.getComponent(i).getBounds();
                    preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                    preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                }
                Insets insets = panel1.getInsets();
                preferredSize.width += insets.right;
                preferredSize.height += insets.bottom;
                panel1.setMinimumSize(preferredSize);
                panel1.setPreferredSize(preferredSize);
            }
        }
        contentPane.add(panel1);
        panel1.setBounds(65, 55, 280, 135);

        { // compute preferred size
            Dimension preferredSize = new Dimension();
            for(int i = 0; i < contentPane.getComponentCount(); i++) {
                Rectangle bounds = contentPane.getComponent(i).getBounds();
                preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
            }
            Insets insets = contentPane.getInsets();
            preferredSize.width += insets.right;
            preferredSize.height += insets.bottom;
            contentPane.setMinimumSize(preferredSize);
            contentPane.setPreferredSize(preferredSize);
        }
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
    private JMenuBar menuBar1;
    private JMenu menu1;
    private JMenuItem menuItem1;
    private JMenu menu2;
    private JMenuItem menuItem2;
    private JMenu menu4;
    private JMenuItem menuItem3;
    private JMenuItem menuItem4;
    private JPanel panel1;
    private JLabel label1;
    // JFormDesigner - End of variables declaration  //GEN-END:variables
}
